package com.lf.web.service.system.menu;

import com.lf.data.search.Sort;
import com.lf.web.service.ServiceSupport;

import java.util.List;

public class MenuListService extends ServiceSupport {

    private MenuDAO menuDAO;

    public MenuListService() {
    }

    public void setMenuDAO(MenuDAO menuDAO) {
        this.menuDAO = menuDAO;
    }

    public String execute() {
        Sort sort = new Sort();
        sort.desc(Menu.INDEX);
        List menus = menuDAO.find(null, null, sort);
        context.put("menus", menus);
        return LIST;
    }
}
